<template>
	<view>
		<view class="m-card m-mg-lr u-p-t-20 u-p-b-20 u-flex boxsh u-flex-around u-m-t-30">
			<u--image :src="zhuangtai ? obj.imgOn : obj.img" width="76" height="76" radius="0"></u--image>
			<view class="m-flex-y u-flex-between u-flex-items-center">
				<text class="u-font-32 c5a">{{ obj.name }}</text>
				<view class="boxren" :style="{ backgroundColor: zhuangtai ? '#0e5642' : '#daaf7f' }"
					@click="getqian(obj)">{{ zhuangtai ? obj.typeOn : obj.type }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'renzheng',
		data() {
			return {};
		},
		props: {
			zhuangtai: {
				type: Boolean,
				default: false
			},
			obj: {
				type: Object,
				default: {}
			}
		},
		methods: {
			getqian(obj) {
				if (obj.url) {
					if (this.zhuangtai) {
						this.$u.toast('您' + obj.typeOn);
					} else {
						this.nextNav(obj.url);
					}
				} else {
					this.$emit('dianji');
				}
			}
		}
	};
</script>

<style lang="scss">
	.boxsh {
		box-shadow: 0 3px 40px 5px rgba(166, 166, 166, 0.1);
	}

	.boxren {
		width: 234rpx;
		height: 48rpx;
		background-color: #daaf7f;
		color: #fff;
		line-height: 48rpx;
		text-align: center;
	}
</style>
